package com.industrial.im.utils;

import com.industrial.im.factory.EmailSendFactory;
import com.industrial.im.service.EmailSendService;
import com.industrial.im.vo.SendEmailVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

@Component
public class EmailSendUtils {

    @Autowired
    private EmailSendFactory emailSendFactory;

    @Async
    public void sendEmail(SendEmailVo vo) {
        EmailSendService emailSend = emailSendFactory.getEmailSend();
        emailSend.sendEmail(vo);
    }
}
